package com.example.demo.common;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

@Slf4j
@Component
@RequiredArgsConstructor
public class TestCommandLineRunner implements CommandLineRunner {

    @Override
    public void run(String... args) throws Exception {
        /**
         * 如果出现异常会直接导致应用进程退出，一定要加异常捕获
         *
         * java.lang.IllegalStateException: Failed to execute CommandLineRunner
         */
    }
}
